This invention pertains to digital image and video manipulation.
During the process of video and image editing, one alters portions or all of a video image, e.g. by moving an image from one portion of a screen to another, rotating the image, expanding the image or shrinking the image. Other common image manipulations include warping an image (i.e. deforming the image in three dimensions), magnifying parts of an image, performing cylindrical, spherical, hyperbolic, or parabolic transformations to the image (e.g. causing a two-dimensional image to appear to bend or wrap around a cylindrical, spherical, hyperbolic or parabolic surface), melting images, etc.
Frequently, the image to be manipulated is in the form of a pixel array. In other words, the image is stored as an array of data values, each value corresponding to the color and brightness of a small area of the image. When performing the above-mentioned video image manipulations, one typically performs calculations to transform every pixel of the image. For example, for each pixel of the image, one performs calculations to determine a new location for that pixel on a video screen. Large image can contain millions of pixels. Further, for the case of image streams (e.g. as in the case of video images), dozens of frames per second must be transformed. Thus, many millions of pixels may have to be analyzed and modified for each transformation in a very short amount of time. Such transformations require either enormous CPU resources or special hardware to be able to transform large numbers of pixels in a short amount of time.
It would be desirable to provide a method for editing and/or manipulating two-dimensional images. This is particularly desirable so that one can edit and/or manipulate many frames of two-dimensional images per second, e.g. a stream of images such as video images. It would be desirable to be able to perform these manipulations quickly and efficiently, without having to construct expensive, sophisticated hardware dedicated to this purpose.
A method in accordance with our invention comprises the step of transforming 2D images into 3D space and using a 3D graphics pipeline for manipulating the image. This method frees up CPU resources, decreases the amount of time needed to perform image manipulation, and permits new special effects.
In one embodiment of our invention, one obtains an image in the form of an array of pixels. This can be accomplished, for example, by digitizing an image. One then xe2x80x9ctransformsxe2x80x9d these images into 3D space using a 3D graphics pipeline. The graphics pipeline can be completely or partially implemented in software or in hardware (e.g. a 3D hardware accelerator).
There are several ways of transforming the array of pixels into 3D space. Typically, the 3D pipeline defines a set of image surface regions, each image surface region being assigned a location in a three-dimensional coordinate system. However, in the case of one embodiment of out invention, all of the surface regions are coplanar. In one embodiment, the surface regions are all polygons, such as triangles, each triangle being defined by a set of points that are assigned a location in terms of x, y, and z coordinates. (All of the coordinates are set up such that they are all located in the same plane.) However, the surface regions can be defined using other graphics techniques as well. For example, the surface regions or the whole surface can be define using an xe2x80x9cimplicitxe2x80x9d technique, in which the positions of the pixels in the space (surface regions) are defined by mathematical equations.
After the set of surface regions is created, we map the 2D pixel array image onto the set of surface regions, to thereby assign to each surface region a texture. In other words, we xe2x80x9cbindxe2x80x9d a portion of a picture of the 2D image to each of the surface regions. After performing this step, we use the 3D graphics pipeline to manipulate the image we have created to perform desired image and/or video editing.
We have discovered that this technique is extremely efficient for processing many 2D images quickly. For example, this technique can be used to process a video image stream, which typically comprises 59.94 frames per second, each frame corresponding to a large pixel array. This technique can be used to manipulate 2D images from other sources as well, e.g. digital scanners, cameras, images files downloaded from the internet, or other sources.
In one embodiment, currently existing off-the-shelf 3D pipelines and/or 3D enhanced processors are used to perform this process. Thus, we have discovered a new, inexpensive method for manipulating 2D images without having to construct special processing software and/or hardware from scratch.
It will be appreciated that we use a 3D graphics pipeline in a novel way. Previously, graphics pipelines were used to map a texture onto a geometric object as a method of giving the geometric object a particular appearance, and to create a new virtual environment comprising a set of such objects. This was done by providing a texture image and a geometry to a graphic pipeline to create a new virtual image. This is in contrast to using the geometry to transform and edit the images.
During a method in accordance with out invention, we apply an image and a special type of geometry to a 3D graphic pipeline to generate a 3D image. We then use the 3D graphics pipeline to transform or manipulate that image in a novel manner.